package com.zretc.demojparedis.commons;

/**
 * 分页数据类
 */
public class PageData<T> {
    private Object data; // 查找[页面上显示]的数据

    private Long count; // 总记录数,这里根据layui来调整了一下

    private Integer limit;// 每页几行,这里根据layui来调整了一下

    private Integer page;// 页数

    private Integer code;// 返回操作成功或者失败的数字

    private String msg; //消息

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public PageData() {
        super();
    }

    /**
     *
     * @param data
     * @param count
     * @param limit
     * @param page
     */
    public PageData(Object data, Long count, Integer limit, Integer page) {
        super();
        this.data = data;
        this.count = count;
        this.limit = limit;
        this.page = page;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }



    @Override
    public String toString() {
        return "{total count:" + count + ",data:" + data + "}";
    }
}